﻿<!DOCTYPE html>
<html lang="en">
<#include "../include/resource-head.ftl"/>
<body>
<#assign active='articleList'/>
<#include "../include/common-top.ftl"/>
<div class="main-container" id="main-container">
    <div class="main-container-inner">
    <#include "../include/common-menu.ftl"/>
        <div class="main-content">
            <div class="page-content">
                <div class="row">
                    <div class="col-xs-12">
                        <div class="form-search">
                            <form class="form-inline clearfix">
                                <div class="input-group">
                                    <span class="input-group-addon">
                                        <i class="icon-calendar bigger-110"></i>
                                    </span>
                                    <input name="starttime"  class="form-control date-picker col-xs-4" type="text" value="${starttime!}" data-date-format="yyyy-mm-dd">
                                    <span class="input-group-addon">至</span>
                                    <input name="endtime" class="form-control date-picker col-xs-4" type="text" value="${endtime!}" data-date-format="yyyy-mm-dd">
                                </div>
                            <@search labels=["手机号码"] names=["phone"] isEnd=false></@search>
                            <@searchSelect label="状态" name="status" valueMap={"0":"禁用","1":"正常"} isEnd=true></@searchSelect>
                            </form>
                        </div>
                        <div class="table-responsive">
                            <table id="sample-table-1" class="table table-striped table-bordered table-hover">
                                <thead>
                                <tr>
                                <@tableHead names=["注册时间","手机号码","贷款笔数","累计贷款金额","最近登录","状态","操作人","操作"]></@tableHead>
                                </tr>
                                </thead>
                                <tbody>
                                <#list pageInfo.list as item>
                                <tr>
                                    <@tableBody model=item propMap={"addtime":"yyyy-MM-dd","phone":"","number":"#0","account":"#0","logindate":"yyyy-MM-dd"}></@tableBody>
                                    <td>${item.status!?switch(0,"禁用",1,"正常","未知")}</td>
                                    <@tableBody model=item propMap={"username":""}></@tableBody>
                                    <td>
                                        <div class="visible-md visible-lg hidden-sm hidden-xs btn-group">
                                            <#if item.status == 0>
                                                <a class="btn btn-xs btn-success"
                                                   href="/admin/user/updateStatus/${item.id}">
                                                    正常
                                                </a>
                                            <#else>
                                                <a class="btn btn-xs btn-danger"
                                                   href="/admin/user/updateStatus/${item.id}">
                                                    禁用
                                                </a>
                                            </#if>
                                        </div>
                                    </td>
                                </tr>
                                </#list>
                                </tbody>
                            </table>
                        <#include "../include/table-page.ftl"/>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
<#include "../include/resource-script.ftl"/>
<script>
    $('.date-picker').datetimepicker({autoclose: true, language: 'zh-CN', minView: 2});
</script>

</html>

